package com.zh.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zh.common.BaseResponse;
import com.zh.domain.dto.requirement.AddRequirementRequest;
import com.zh.domain.dto.requirement.PageReqDynamicRequest;
import com.zh.domain.dto.requirement.UpdateRequirementRequest;
import com.zh.domain.entity.ReqComments;
import com.zh.domain.entity.Requirements;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zh.domain.vo.requirement.ReqDynamicVo;
import com.zh.domain.vo.requirement.RequirementVo;
import com.zh.domain.vo.task.TaskDynamicVo;

import java.util.List;

/**
* @author Administrator
* @description 针对表【requirements(需求表)】的数据库操作Service
* @createDate 2025-02-09 16:24:10
*/
public interface RequirementsService extends IService<Requirements> {

    Boolean addRequirement(AddRequirementRequest addRequirementRequest);

    void sendMessageAndDynamicWhenAdd(Integer creatorId, Requirements requirements);

    List<RequirementVo> listByIterationId(Integer iterId);

    Boolean updateRequirement(UpdateRequirementRequest updateRequirementRequest);
    Boolean updateRequirement(Integer userId,UpdateRequirementRequest updateRequirementRequest);
    void sendMessageAndDynamicWhenUpdate(Integer operatorId, Requirements oldRequirement, Requirements newRequirement);
    RequirementVo getDetail(Integer id);

    RequirementVo getByTaskId(Integer taskId);

    void updateProcessById(Integer id);

    Page<ReqDynamicVo> pageDynamics(PageReqDynamicRequest pageReqDynamicRequest);

    List<RequirementVo> listByProjectIdAndOwnerId(Integer projectId, Integer ownerId);
}
